<?php

/**
 * @copyright 2012
 */
require_once("Account.php");


$name = $_GET["name"];
$money = $_GET["money"];
$id = $_GET["id"];
/////////////////////////////////
$account = new Account();
$account->Init($id);
if($name)
{
    $account->name = $name;
}
if($money)
{
    $account->money = $money;
}
$account->Update();
/////////////////////////////////

  $doc = new DOMDocument();
  $doc->formatOutput = true;
  
  $r = $doc->createElement("accounts");
  $doc->appendChild($r);
  
  $accountXMLNode = $account->GetXMLNode($doc);
  $r->appendChild($accountXMLNode);
  
  echo $doc->saveXML();


?>